package day2.scaladay01

import scala.collection.mutable.ArrayBuffer


object ArrayBufferDemo {
  def main(args: Array[String]): Unit = {
    val arrBuffer = ArrayBuffer(1, 2, 3)
    arrBuffer += 4
    arrBuffer += (5, 6, 7)
    arrBuffer ++= Array(8, 9, 10)
    arrBuffer ++= ArrayBuffer(11, 12, 13)

    println(arrBuffer)
    //println(arrBuffer.toBuffer)
    arrBuffer.insert(0, -1, 2, 3)
    println(arrBuffer)
    arrBuffer.remove(0, 2)
    println(arrBuffer)


  }


}
